home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / demos / demobook / CreateGroup.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  32.2 KB  |  1,070 lines

  1. /*
  2.  * Copyright 1993, 1994, Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or
  7.  * duplicated in any form, in whole or in part, without the prior written
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15.  * rights reserved under the Copyright Laws of the United States.
  16.  */
  17.  
  18. /*******************************************************************************
  19.     CreateGroup.c
  20.  
  21. *******************************************************************************/
  22.  
  23. #include <stdio.h>
  24. #include <Xm/Xm.h>
  25. #include <X11/Xirisw/GlxMDraw.h>
  26. #include <X11/Shell.h>
  27. #include <Xm/MenuShell.h>
  28. #include "UxXt.h"
  29.  
  30. #include <Xm/List.h>
  31. #include <Xm/ScrolledW.h>
  32. #include <Xm/SeparatoG.h>
  33. #include <Xm/Label.h>
  34. #include <Xm/RowColumn.h>
  35. #include <Xm/PushB.h>
  36. #include <Xm/Frame.h>
  37. #include <Xm/TextF.h>
  38. #include <Xm/Form.h>
  39.  
  40. /*******************************************************************************
  41.     Includes, Defines, and Global variables from the Declarations Editor:
  42. *******************************************************************************/
  43.  
  44. #include "exinterfmotif.h"
  45. #include <string.h>
  46. #include "exbookglo.h"
  47. #include "exglobals.h"
  48. #include "exinterf.h"
  49.  
  50. extern void popup_colorview();
  51. extern void popdown_colorview();
  52. void dogroupview();
  53.  
  54.     static GLXconfig glxconfig[] = {
  55.         {GLX_NORMAL, GLX_ZSIZE, GLX_NOCONFIG},
  56.         {GLX_NORMAL, GLX_RGB, TRUE}, 
  57.         {0, 0, 0} };
  58.  
  59. static char defaultTranslations[] = 
  60.     "<EnterNotify>: glxInput() \n\
  61.     <LeaveNotify>: glxInput()";
  62.  
  63. static Boolean in_group_window = FALSE;
  64.  
  65. /*******************************************************************************
  66.     The definition of the context structure:
  67.     If you create multiple instances of your interface, the context
  68.     structure ensures that your callbacks use the variables for the
  69.     correct instance.
  70.  
  71.     For each Widget in the interface, each argument to the Interface
  72.     function, and each variable in the Instance Specific section of the
  73.     Declarations Editor, there is an entry in the context structure.
  74.     and a #define.  The #define makes the variable name refer to the
  75.     corresponding entry in the context structure.
  76. *******************************************************************************/
  77.  
  78. typedef    struct
  79. {
  80.     Widget    UxGroupNameText;
  81.     Widget    UxGroupHelpFileText;
  82.     Widget    UxGroupDoneButton;
  83.     Widget    UxGroupCancelButton;
  84.     Widget    UxGroupNextButton;
  85.     Widget    UxGroupExistKeywordWindow;
  86.     Widget    UxGroupExistKeywordList;
  87.     Widget    UxGroupNewKeywordText;
  88.     Widget    UxGroupKeywordWindow;
  89.     Widget    UxGroupKeywordList;
  90.     Widget    UxGroupDeleteButton;
  91.     Widget    UxColorButton;
  92.     Widget    UxGroupGL; 
  93. } _UxCCreateGroup;
  94.  
  95. #define GroupNameText           UxCreateGroupContext->UxGroupNameText
  96. #define GroupHelpFileText       UxCreateGroupContext->UxGroupHelpFileText
  97. #define GroupDoneButton         UxCreateGroupContext->UxGroupDoneButton
  98. #define GroupCancelButton       UxCreateGroupContext->UxGroupCancelButton
  99. #define GroupNextButton         UxCreateGroupContext->UxGroupNextButton
  100. #define GroupExistKeywordWindow UxCreateGroupContext->UxGroupExistKeywordWindow
  101. #define GroupExistKeywordList   UxCreateGroupContext->UxGroupExistKeywordList
  102. #define GroupNewKeywordText     UxCreateGroupContext->UxGroupNewKeywordText
  103. #define GroupKeywordWindow      UxCreateGroupContext->UxGroupKeywordWindow
  104. #define GroupKeywordList        UxCreateGroupContext->UxGroupKeywordList
  105. #define GroupDeleteButton       UxCreateGroupContext->UxGroupDeleteButton
  106. #define ColorButton             UxCreateGroupContext->UxColorButton
  107. #define GroupGL                 UxCreateGroupContext->UxGroupGL
  108.  
  109. void initCB_Group( Widget w, XtPointer client_data, XtPointer call_data);
  110. void exposeCB_Group( Widget w, XtPointer client_data, XtPointer call_data);
  111. void resizeCB_Group( Widget w, XtPointer client_data, XtPointer call_data);
  112. void inputCB_Group( Widget w, XtPointer client_data, XtPointer call_data);
  113.  
  114. static _UxCCreateGroup    *UxCreateGroupContext;
  115.  
  116. /*
  117. Widget    CreateGroup;
  118. */
  119.  
  120. /*******************************************************************************
  121.     Forward declarations of functions that are defined later in this file.
  122. *******************************************************************************/
  123.  
  124. Widget    create_CreateGroup();
  125.  
  126. void setgroupwin()
  127. {
  128.    GLXwinset (XtDisplay(GroupGL), XtWindow(GroupGL) );
  129.    dogroupview();
  130. }
  131.  
  132. void dogroupview()
  133. {
  134.    GLXwinset (XtDisplay(GroupGL), XtWindow(GroupGL) );
  135.    setgroupview();
  136. }
  137.  
  138. /*******************************************************************************
  139.     The following are callback functions.
  140. *******************************************************************************/
  141.  
  142. void exposeCB_Group( Widget w, XtPointer client_data, XtPointer call_data)
  143. {
  144.    GLXwinset (XtDisplay(w), XtWindow(w) );
  145.    dogroupview();
  146.    drawgroupwin();
  147. }
  148.  
  149. void resizeCB_Group( Widget w, XtPointer client_data, XtPointer call_data)
  150. {
  151.    GLXwinset (XtDisplay(w), XtWindow(w) );
  152.    reshapeviewport();
  153.    dogroupview();
  154. }
  155. void initCB_Group( Widget w, XtPointer client_data, XtPointer call_data)
  156. {
  157.    GLXwinset (XtDisplay(w), XtWindow(w) );
  158.    dogroupview();
  159.  
  160.    c3s(morecolors[9]);
  161.    clear();
  162. }
  163.  
  164. void inputCB_Group(Widget w, XtPointer client_data, XtPointer call_data)
  165. {
  166.    GlxDrawCallbackStruct *glcall;
  167.  
  168.    glcall = (GlxDrawCallbackStruct *)call_data;
  169.    switch (glcall->event->type)
  170.       {
  171.       case EnterNotify:
  172.          in_group_window = TRUE;
  173. /*
  174.          if (seliconptr != NULL)
  175.             { 
  176. printf(" seliconptr != NULL %s\n", seliconptr->iconptr->nameptr->string);
  177.             }
  178. */
  179.       break;
  180.       case LeaveNotify:
  181.          in_group_window = FALSE;
  182.       break;
  183.       case ButtonPress:
  184.       break;
  185.       case ButtonRelease:
  186.       break;
  187.       case MotionNotify:
  188.       break;
  189.       }
  190. }
  191.  
  192. static void    activateCB_GroupDoneButton( UxWidget, UxClientData, UxCallbackArg )
  193.     Widget        UxWidget;
  194.     XtPointer    UxClientData, UxCallbackArg;
  195. {
  196.     _UxCCreateGroup         *UxSaveCtx, *UxContext;
  197.     struct charlist *charptr, *prevcharptr;
  198.         char *tmpstr;
  199.  
  200.     UxSaveCtx = UxCreateGroupContext;
  201.     UxCreateGroupContext = UxContext =
  202.             (_UxCCreateGroup *) UxGetContext( UxWidget );
  203.     {
  204.     strcpy (AGName.buf, (char *)XmTextFieldGetString(GroupNameText));
  205.     AGName.bufpos = strlen(AGName.buf);
  206.     if (AGName.bufpos <= 0) {
  207.       sprintf(msgstring, "\nYou must enter a Name.\n");
  208.       DialogType = 1;
  209.       popup_Message();
  210.     }
  211.     else {
  212.       if (newgrpptr != NULL) {
  213.             tmpstr = XmTextFieldGetString(GroupHelpFileText);
  214. printf(" tmpstr = %s \n",tmpstr);
  215.             strcpy(AGHfile.buf, tmpstr);
  216.             XtFree(tmpstr);
  217.             AGHfile.bufpos = strlen(AGHfile.buf);
  218.         GetGroupKeywords();
  219.             if (newgroupiconlist != NULL)
  220.                 {
  221.             if (EditGroupFlag == 0) {
  222.               add_group(newgrpptr, lastgroup);
  223.             }
  224.             else {
  225.               savegroupchanges(newgrpptr);
  226.               EditGroupFlag = 0;
  227.             }
  228.                 }
  229.              else  /* there were no icons, treat the done button
  230.                                                 like a cancel button */
  231.                 {
  232.                 if (EditGroupFlag == 0)
  233.                    {
  234.                    free(newgrpptr);
  235.                    free(curnewpage);
  236.                    }
  237.                 else if (EditGroupFlag == 1)
  238.                    {
  239.                    EditGroupFlag = 0;
  240.                    charptr = HeadGrpChar;
  241.                    while (charptr != NULL)
  242.                       {
  243.                       prevcharptr = charptr->next;
  244.                       if (charptr->indexflag == 0)
  245.                          free(charptr->str);
  246.                       free(charptr);
  247.                       charptr = prevcharptr;
  248.                       }
  249.                    HeadGrpChar = NULL;
  250.                    TailGrpChar = NULL;
  251.                    }
  252.                 }
  253.         newgrpptr = NULL;
  254.         curnewpage = NULL;
  255.         XtVaSetValues( GroupNameText, XmNvalue, "", NULL );
  256.         XtVaSetValues( GroupHelpFileText, XmNvalue, "", NULL );
  257.         XtVaSetValues( GroupNewKeywordText, XmNvalue, "", NULL );
  258.         XmListDeselectAllItems(GroupExistKeywordList);
  259.         XmListSetPos(GroupExistKeywordList, 1);
  260.         XmListDeleteAllItems(GroupKeywordList);
  261.         MotifGroupWin = -1;
  262.         UxPopdownInterface(CreateGroup);
  263. /* MB 5/4/93  temporarily taking the color picker out of demobook
  264.         popdown_colorview();
  265. */
  266.         InterfaceWinOpen-- ;
  267.             dobookview();
  268.       }
  269.     }
  270.     }
  271.     UxCreateGroupContext = UxSaveCtx;
  272. }
  273.  
  274. static void    activateCB_GroupCancelButton( UxWidget, UxClientData, UxCallbackArg )
  275.     Widget        UxWidget;
  276.     XtPointer    UxClientData, UxCallbackArg;
  277. {
  278.     _UxCCreateGroup         *UxSaveCtx, *UxContext;
  279.  
  280.     UxSaveCtx = UxCreateGroupContext;
  281.     UxCreateGroupContext = UxContext =
  282.             (_UxCCreateGroup *) UxGetContext( UxWidget );
  283.     {
  284.     struct charlist *charptr, *prevcharptr;
  285.  
  286.     if (EditGroupFlag == 0) {
  287.       free(newgrpptr);
  288.       free(curnewpage);
  289.       newgrpptr = NULL;
  290.       curnewpage = NULL;
  291.     }
  292.     if (EditGroupFlag == 1) {
  293.       EditGroupFlag = 0;
  294.       charptr = HeadGrpChar;
  295.       while (charptr != NULL) {
  296.         prevcharptr = charptr->next;
  297.         if (charptr->indexflag == 0) free(charptr->str);
  298.         free(charptr);
  299.         charptr = prevcharptr;
  300.       }
  301.       HeadGrpChar = NULL;
  302.       TailGrpChar = NULL;
  303.     }
  304.     clear_iconlist(newgroupiconlist);
  305.     newgroupiconlist = NULL;
  306.     newgrouplasticon = NULL;
  307.     freegpform();
  308.     XtVaSetValues( GroupNameText, XmNvalue, "", NULL );
  309.     XtVaSetValues( GroupHelpFileText, XmNvalue, "", NULL );
  310.     XtVaSetValues( GroupNewKeywordText, XmNvalue, "", NULL );
  311.     XmListDeselectAllItems(GroupExistKeywordList);
  312.     XmListSetPos(GroupExistKeywordList, 1);
  313.     XmListDeleteAllItems(GroupKeywordList);
  314.     MotifGroupWin = -1;
  315.     UxPopdownInterface(CreateGroup);
  316. /* MB 5/4/93  temporarily taking the color picker out of demobook
  317.     popdown_colorview();
  318. */
  319.     InterfaceWinOpen-- ;
  320.         drawscene(0);
  321.     }
  322.     UxCreateGroupContext = UxSaveCtx;
  323. }
  324.  
  325. static void    activateCB_GroupNextButton( UxWidget, UxClientData, UxCallbackArg )
  326.     Widget        UxWidget;
  327.     XtPointer    UxClientData, UxCallbackArg;
  328. {
  329.     _UxCCreateGroup         *UxSaveCtx, *UxContext;
  330.     struct charlist *charptr, *prevcharptr;
  331.     char *tmpstr;
  332.  
  333.     UxSaveCtx = UxCreateGroupContext;
  334.     UxCreateGroupContext = UxContext =
  335.             (_UxCCreateGroup *) UxGetContext( UxWidget );
  336.     {
  337.     strcpy (AGName.buf, (char *)XmTextFieldGetString(GroupNameText));
  338.     AGName.bufpos = strlen(AGName.buf);
  339.     if (AGName.bufpos <= 0) {
  340.       sprintf(msgstring, "\nYou must enter a Name.\n");
  341.       DialogType = 1;
  342.       popup_Message();
  343.     }
  344.     else {
  345.       if (newgrpptr != NULL) {
  346.           if (newgroupiconlist != NULL)
  347.              {
  348.             tmpstr = XmTextFieldGetString(GroupHelpFileText);
  349.             strcpy(AGHfile.buf, tmpstr);
  350.             XtFree(tmpstr);
  351.             AGHfile.bufpos = strlen(AGHfile.buf);
  352.       GetGroupKeywords();
  353.       add_group(newgrpptr, lastgroup);
  354.              }
  355.           else
  356.              {
  357.              EditGroupFlag = 0;
  358.              charptr = HeadGrpChar;
  359.              while (charptr != NULL)
  360.                 {
  361.                 prevcharptr = charptr->next;
  362.                 if (charptr->indexflag == 0)
  363.                    free(charptr->str);
  364.                 free(charptr);
  365.                 charptr = prevcharptr;
  366.                 }
  367.              HeadGrpChar = NULL;
  368.              }
  369.       dogroupview();
  370.       initgroup();
  371. /* why is this here ?  */
  372.       drawgroupwin();
  373.       initgpform();
  374.       XtVaSetValues( GroupNameText, XmNvalue, "", NULL );
  375.       XtVaSetValues( GroupHelpFileText, XmNvalue, "", NULL );
  376.       XtVaSetValues( GroupNewKeywordText, XmNvalue, "", NULL );
  377.       XmListDeselectAllItems(GroupExistKeywordList);
  378.       XmListSetPos(GroupExistKeywordList, 1);
  379.       XtVaSetValues( GroupExistKeywordList,
  380.             XmNitemCount, ExistKeywordCount,
  381.             RES_CONVERT( XmNitems, ExistKeywordString ),
  382.             NULL );
  383.       XmListDeleteAllItems(GroupKeywordList);
  384.       }
  385.     }
  386.     }
  387.     UxCreateGroupContext = UxSaveCtx;
  388.  drawgroupwin();
  389. }
  390.  
  391. static void    browseSelectionCB_GroupExistKeywordList( UxWidget, UxClientData, UxCallbackArg )
  392.     Widget        UxWidget;
  393.     XtPointer    UxClientData, UxCallbackArg;
  394. {
  395.     _UxCCreateGroup         *UxSaveCtx, *UxContext;
  396.  
  397.     UxSaveCtx = UxCreateGroupContext;
  398.     UxCreateGroupContext = UxContext =
  399.             (_UxCCreateGroup *) UxGetContext( UxWidget );
  400.     {
  401.     int *pos_list;
  402.     int pos_count;
  403.     int i;
  404.     XmListCallbackStruct *cbs;
  405.  
  406.     cbs = (XmListCallbackStruct *)UxCallbackArg;
  407.         if ( ! (XmListItemExists(GroupKeywordList, cbs->item)) ) {
  408.           XmListAddItem(GroupKeywordList, cbs->item, 0);
  409.           XmListSetBottomPos(GroupKeywordList, 0);
  410.           KW_change = TRUE;
  411.         }
  412.     }
  413.     UxCreateGroupContext = UxSaveCtx;
  414. }
  415.  
  416. static void    activateCB_GroupNewKeywordText( UxWidget, UxClientData, UxCallbackArg )
  417.     Widget        UxWidget;
  418.     XtPointer    UxClientData, UxCallbackArg;
  419. {
  420.     _UxCCreateGroup         *UxSaveCtx, *UxContext;
  421.  
  422.     UxSaveCtx = UxCreateGroupContext;
  423.     UxCreateGroupContext = UxContext =
  424.             (_UxCCreateGroup *) UxGetContext( UxWidget );
  425.     {
  426.     XmString item;
  427.     AGKey.bufpos = 0;
  428.     bufclear(&AGKey);
  429.     strcpy(AGKey.buf, (char *)XmTextFieldGetString(GroupNewKeywordText));
  430.     AGKey.bufpos = strlen(AGKey.buf);
  431.     if (AGKey.bufpos > 0) {
  432.       item = (XmString)XmStringCreateLtoR(
  433.             AGKey.buf, XmSTRING_DEFAULT_CHARSET);
  434.       if ( ! (XmListItemExists(GroupKeywordList,item)) ) {
  435.         XmListAddItem(GroupKeywordList, item, 0);
  436.         XmListSetBottomPos(GroupKeywordList, 0);
  437.         XtVaSetValues( GroupNewKeywordText, XmNvalue, "", NULL );
  438.         KW_change = TRUE;
  439.       }
  440.     }
  441.     }
  442.     UxCreateGroupContext = UxSaveCtx;
  443. }
  444.  
  445. static void    activateCB_GroupDeleteButton( UxWidget, UxClientData, UxCallbackArg )
  446.     Widget        UxWidget;
  447.     XtPointer    UxClientData, UxCallbackArg;
  448. {
  449.     _UxCCreateGroup         *UxSaveCtx, *UxContext;
  450.  
  451.     UxSaveCtx = UxCreateGroupContext;
  452.     UxCreateGroupContext = UxContext =
  453.             (_UxCCreateGroup *) UxGetContext( UxWidget );
  454.     {
  455.     int *pos_list;
  456.     int pos_count;
  457.     while ( XmListGetSelectedPos(
  458.       (GroupKeywordList), &pos_list, &pos_count) ) {
  459.       XmListDeletePos(GroupKeywordList, pos_list[0]);
  460.       KW_change = TRUE;
  461.       XtFree((char *)pos_list);
  462.     }
  463.     }
  464.     UxCreateGroupContext = UxSaveCtx;
  465. }
  466.  
  467. static void    activateCB_ColorButton( UxWidget, UxClientData, UxCallbackArg )
  468.     Widget        UxWidget;
  469.     XtPointer    UxClientData, UxCallbackArg;
  470. {
  471.     _UxCCreateGroup         *UxSaveCtx, *UxContext;
  472.  
  473. /* MB 5/4/93 this routine should never be called  */
  474.     UxSaveCtx = UxCreateGroupContext;
  475.     UxCreateGroupContext = UxContext =
  476.             (_UxCCreateGroup *) UxGetContext( UxWidget );
  477.     {
  478. /* MB 5/4/93  temporarily taking the color picker out of demobook
  479.     popup_colorview();
  480. */
  481.     }
  482.     UxCreateGroupContext = UxSaveCtx;
  483. }
  484.  
  485. /*******************************************************************************
  486.     The 'build_' function creates all the Widgets and X widgets,
  487.     and sets their properties to the values specified in the
  488.     Property Editor.
  489. *******************************************************************************/
  490.  
  491. Widget CreateGroup_shell;
  492.  
  493. static Widget    _Uxbuild_CreateGroup()
  494. {
  495.    Widget GroupGLframe, CGform;
  496.    Widget form, form2, form3;
  497.    Widget label, sep;
  498.    Arg wargs[10];
  499.    int n;
  500.    XtTranslations mytrans;
  501.  
  502.     CreateGroup_shell = XtVaCreatePopupShell( "CreateBook_shell",
  503.             topLevelShellWidgetClass, DBtoplevel,
  504.             XmNx, 425,
  505.             XmNy, 600,
  506.             XmNwidth, 1000,
  507.             XmNheight, 400,
  508.             XmNtitle, "Book",
  509.             XmNiconName, "CreateBook",
  510.             NULL );
  511.  
  512.     CGform = XtVaCreateManagedWidget( "AddBook",
  513.             xmFormWidgetClass, CreateGroup_shell,
  514.             XmNresizePolicy, XmRESIZE_NONE,
  515.             XmNheight, 400,
  516.             XmNwidth, 1000,
  517.             XmNverticalSpacing, 10,
  518.             XmNhorizontalSpacing, 10,
  519.             NULL );
  520.  
  521.     UxPutContext( CGform, (char *) UxCreateGroupContext );
  522.  
  523.    n = 0;
  524.    XtSetArg(wargs[n], XmNheight, 400); n++;
  525.    XtSetArg(wargs[n], XmNwidth, 340); n++;
  526.     GroupGLframe = XtCreateManagedWidget( "CreateGroup_GLframe",
  527.             xmFrameWidgetClass, CGform,
  528.             wargs, n);
  529.  
  530.         mytrans = XtParseTranslationTable(defaultTranslations);
  531.     n = 0;
  532.     XtSetArg(wargs[n],GlxNglxConfig, glxconfig); n++;
  533.     XtSetArg(wargs[n], XmNheight, 400); n++;
  534.     XtSetArg(wargs[n], XmNwidth, 340); n++;
  535.     XtSetArg (wargs[n], XmNleftAttachment, XmATTACH_FORM); n++;
  536.     XtSetArg (wargs[n], XmNrightAttachment, XmATTACH_FORM); n++;
  537.     XtSetArg(wargs[n], XmNtopAttachment, XmATTACH_FORM); n++;
  538.     XtSetArg(wargs[n], XmNbottomAttachment, XmATTACH_FORM); n++;
  539.     GroupGL = GlxCreateMDraw(GroupGLframe, "glwidget", wargs, n);
  540.     XtAddCallback( GroupGL, GlxNginitCallback, initCB_Group, NULL);
  541.     XtAddCallback( GroupGL, GlxNexposeCallback, exposeCB_Group, NULL);
  542.     XtAddCallback( GroupGL, GlxNresizeCallback, resizeCB_Group, NULL);
  543.     XtAddCallback( GroupGL, GlxNinputCallback, inputCB_Group, NULL);
  544.     XtManageChild(GroupGL);
  545.         XtAugmentTranslations(GroupGL, mytrans);
  546.  
  547.     UxPutContext( GroupGL, (char *) UxCreateGroupContext );
  548.  
  549.    n = 0;
  550.    XtSetArg(wargs[n], XmNrightAttachment, XmATTACH_FORM); n++;
  551.    XtSetArg(wargs[n], XmNtopAttachment, XmATTACH_FORM); n++;
  552.    XtSetArg(wargs[n], XmNleftAttachment, XmATTACH_WIDGET); n++;
  553.    XtSetArg(wargs[n], XmNleftWidget, GroupGLframe); n++;
  554. /*
  555.    XtSetArg(wargs[n], XmNverticalSpacing, 10); n++;
  556. */
  557.    XtSetArg(wargs[n], XmNhorizontalSpacing, 10); n++;
  558.     form = XtCreateManagedWidget( "form",
  559.             xmFormWidgetClass, CGform,
  560.             wargs, n );
  561.  
  562. /* MB 5/4/93  temporarily taking the color picker out of demobook
  563.     ColorButton = XtVaCreateManagedWidget( "ColorButton",
  564.             xmPushButtonWidgetClass, form,
  565.             XmNrecomputeSize, FALSE,
  566.             XmNmarginWidth, 2,
  567.             XmNmarginTop, 0,
  568.             XmNmarginRight, 0,
  569.             XmNmarginLeft, 0,
  570.             XmNmarginHeight, 2,
  571.             XmNmarginBottom, 0,
  572.             XmNheight, 36,
  573.             XmNwidth, 120,
  574.             XmNalignment, XmALIGNMENT_CENTER,
  575.             XmNhighlightOnEnter, TRUE,
  576.                         XmNrightAttachment, XmATTACH_FORM,
  577.             XmNbottomAttachment, XmATTACH_FORM,
  578.             NULL );
  579.  
  580.     UxPutContext( ColorButton, (char *) UxCreateGroupContext );
  581. */
  582.  
  583.     label = XtVaCreateManagedWidget( "NameLabel",
  584.             xmLabelWidgetClass, form,
  585.             XmNrecomputeSize, FALSE,
  586.             XmNmarginWidth, 2,
  587.             XmNmarginTop, 0,
  588.             XmNmarginRight, 0,
  589.             XmNmarginLeft, 0,
  590.             XmNmarginHeight, 2,
  591.             XmNmarginBottom, 0,
  592.             XmNalignment, XmALIGNMENT_BEGINNING,
  593.             XmNborderWidth, 0,
  594.             XmNleftAttachment, XmATTACH_FORM,
  595.             XmNbottomAttachment, XmATTACH_FORM,
  596.             NULL );
  597.  
  598.     GroupNameText = XtVaCreateManagedWidget( "GroupNameText",
  599.             xmTextFieldWidgetClass, form,
  600.             XmNresizeWidth, FALSE,
  601.             XmNhighlightOnEnter, TRUE,
  602.             XmNtopAttachment, XmATTACH_FORM,
  603.             XmNleftAttachment, XmATTACH_WIDGET,
  604.                         XmNleftWidget, label,
  605. /* MB 5/4/93  temporarily taking the color picker out of demobook
  606.             XmNrightAttachment, XmATTACH_WIDGET,
  607.                         XmNrightWidget, ColorButton,
  608. */
  609.             XmNrightAttachment, XmATTACH_FORM,
  610.             XmNbottomAttachment, XmATTACH_FORM,
  611.             NULL );
  612.  
  613.     UxPutContext( GroupNameText, (char *) UxCreateGroupContext );
  614.  
  615.    n = 0;
  616.    XtSetArg(wargs[n], XmNleftAttachment, XmATTACH_WIDGET); n++;
  617.    XtSetArg(wargs[n], XmNleftWidget, GroupGLframe); n++;
  618.    XtSetArg(wargs[n], XmNrightAttachment, XmATTACH_FORM); n++;
  619.    XtSetArg(wargs[n], XmNbottomAttachment, XmATTACH_FORM); n++;
  620.    XtSetArg(wargs[n], XmNverticalSpacing, 10); n++;
  621.    XtSetArg(wargs[n], XmNhorizontalSpacing, 10); n++;
  622.    form3 = XtCreateManagedWidget( "form3",
  623.     xmFormWidgetClass, CGform, wargs, n );
  624.  
  625.     GroupCancelButton = XtVaCreateManagedWidget( "CancelButton",
  626.             xmPushButtonWidgetClass, form3,
  627.             XmNrecomputeSize, FALSE,
  628.             XmNmarginWidth, 2,
  629.             XmNmarginTop, 0,
  630.             XmNmarginRight, 0,
  631.             XmNmarginLeft, 0,
  632.             XmNmarginHeight, 2,
  633.             XmNmarginBottom, 0,
  634.             XmNalignment, XmALIGNMENT_CENTER,
  635.             XmNhighlightOnEnter, TRUE,
  636.             XmNrightAttachment, XmATTACH_FORM,
  637.             NULL );
  638.  
  639.     UxPutContext( GroupCancelButton, (char *) UxCreateGroupContext );
  640.  
  641.     GroupDoneButton = XtVaCreateManagedWidget( "DoneButton",
  642.             xmPushButtonWidgetClass, form3,
  643.             XmNrecomputeSize, FALSE,
  644.             XmNmarginWidth, 2,
  645.             XmNmarginTop, 0,
  646.             XmNmarginRight, 0,
  647.             XmNmarginLeft, 0,
  648.             XmNmarginHeight, 2,
  649.             XmNmarginBottom, 0,
  650.             XmNalignment, XmALIGNMENT_CENTER,
  651.             XmNhighlightOnEnter, TRUE,
  652.             XmNrightAttachment, XmATTACH_WIDGET,
  653.             XmNrightWidget, GroupCancelButton,
  654.             NULL );
  655.  
  656.     UxPutContext( GroupDoneButton, (char *) UxCreateGroupContext );
  657.  
  658.     GroupNextButton = XtVaCreateManagedWidget( "NextButton",
  659.             xmPushButtonWidgetClass, form3,
  660.             XmNrecomputeSize, FALSE,
  661.             XmNmarginWidth, 2,
  662.             XmNmarginTop, 0,
  663.             XmNmarginRight, 0,
  664.             XmNmarginLeft, 0,
  665.             XmNmarginHeight, 2,
  666.             XmNmarginBottom, 0,
  667.             XmNalignment, XmALIGNMENT_CENTER,
  668.             XmNhighlightOnEnter, TRUE,
  669.             XmNrightAttachment, XmATTACH_WIDGET,
  670.             XmNrightWidget, GroupDoneButton,
  671.             NULL );
  672.  
  673.     UxPutContext( GroupNextButton, (char *) UxCreateGroupContext );
  674.  
  675.     sep = XtVaCreateManagedWidget( "GroupSeparatorGadget",
  676.             xmSeparatorGadgetClass, CGform,
  677.             XmNshadowThickness, 6,
  678.             XmNleftAttachment, XmATTACH_WIDGET,
  679.             XmNleftWidget, GroupGLframe,
  680.             XmNrightAttachment, XmATTACH_FORM,
  681.             XmNbottomAttachment, XmATTACH_WIDGET,
  682.             XmNbottomWidget, form3,
  683.             NULL );
  684.  
  685.    n = 0;
  686.    XtSetArg(wargs[n], XmNleftAttachment, XmATTACH_WIDGET); n++;
  687.    XtSetArg(wargs[n], XmNleftWidget, GroupGLframe); n++;
  688.    XtSetArg(wargs[n], XmNrightAttachment, XmATTACH_FORM); n++;
  689.    XtSetArg(wargs[n], XmNtopAttachment, XmATTACH_WIDGET); n++;
  690.    XtSetArg(wargs[n], XmNtopWidget, form); n++;
  691. /*
  692.    XtSetArg(wargs[n], XmNverticalSpacing, 10); n++;
  693. */
  694.    XtSetArg(wargs[n], XmNhorizontalSpacing, 10); n++;
  695.    form3 = XtCreateManagedWidget( "form3",
  696.     xmFormWidgetClass, CGform, wargs, n );
  697.  
  698.     label = XtVaCreateManagedWidget( "HelpFileLabel",
  699.             xmLabelWidgetClass, form3,
  700.             XmNrecomputeSize, FALSE,
  701.             XmNmarginWidth, 2,
  702.             XmNmarginTop, 0,
  703.             XmNmarginRight, 0,
  704.             XmNmarginLeft, 0,
  705.             XmNmarginHeight, 2,
  706.             XmNmarginBottom, 0,
  707.             XmNalignment, XmALIGNMENT_BEGINNING,
  708.             XmNborderWidth, 0,
  709.             XmNleftAttachment, XmATTACH_FORM,
  710.             XmNbottomAttachment, XmATTACH_FORM,
  711.             NULL );
  712.  
  713.     GroupHelpFileText = XtVaCreateManagedWidget( "GroupHelpFileText",
  714.             xmTextFieldWidgetClass, form3,
  715.             XmNresizeWidth, FALSE,
  716.             XmNhighlightOnEnter, TRUE,
  717.             XmNtopAttachment, XmATTACH_FORM,
  718.             XmNleftAttachment, XmATTACH_WIDGET,
  719.                         XmNleftWidget, label,
  720.             XmNrightAttachment, XmATTACH_FORM,
  721.             XmNbottomAttachment, XmATTACH_FORM,
  722.             NULL );
  723.  
  724.     UxPutContext( GroupHelpFileText, (char *) UxCreateGroupContext );
  725.  
  726.    n = 0;
  727.    XtSetArg(wargs[n], XmNtopAttachment, XmATTACH_WIDGET); n++;
  728.    XtSetArg(wargs[n], XmNtopWidget, form3); n++;
  729.    XtSetArg(wargs[n], XmNbottomAttachment, XmATTACH_WIDGET); n++;
  730.    XtSetArg(wargs[n], XmNbottomWidget, sep); n++;
  731.    XtSetArg(wargs[n], XmNleftAttachment, XmATTACH_WIDGET); n++;
  732.    XtSetArg(wargs[n], XmNleftWidget, GroupGLframe); n++;
  733.    XtSetArg(wargs[n], XmNrightAttachment, XmATTACH_FORM); n++;
  734.    XtSetArg(wargs[n], XmNverticalSpacing, 10); n++;
  735.    XtSetArg(wargs[n], XmNhorizontalSpacing, 10); n++;
  736.     form2 = XtCreateManagedWidget( "CreateGroupform2",
  737.             xmFormWidgetClass, CGform,
  738.             wargs, n );
  739.  
  740.    n = 0;
  741.    XtSetArg(wargs[n], XmNtopAttachment, XmATTACH_FORM); n++;
  742.    XtSetArg(wargs[n], XmNbottomAttachment, XmATTACH_FORM); n++;
  743.    XtSetArg(wargs[n], XmNleftAttachment, XmATTACH_FORM); n++;
  744.     form = XtCreateManagedWidget( "CreateGroupform",
  745.             xmFormWidgetClass, form2,
  746.             wargs, n );
  747.  
  748.     label = XtVaCreateManagedWidget( "GroupExistKeywordLabel",
  749.             xmLabelWidgetClass, form,
  750.             XmNrecomputeSize, FALSE,
  751.             XmNmarginWidth, 2,
  752.             XmNmarginTop, 0,
  753.             XmNmarginRight, 0,
  754.             XmNmarginLeft, 0,
  755.             XmNmarginHeight, 2,
  756.             XmNmarginBottom, 0,
  757.             XmNtopAttachment, XmATTACH_FORM,
  758.             XmNalignment, XmALIGNMENT_BEGINNING,
  759.             XmNborderWidth, 0,
  760.             NULL );
  761.  
  762.     GroupExistKeywordWindow = XtVaCreateManagedWidget( "GroupExistKeywordWindow",
  763.             xmScrolledWindowWidgetClass, form,
  764.             RES_CONVERT( XmNbackground, "#7777BB" ),
  765.             XmNvisualPolicy, XmVARIABLE,
  766.             XmNscrollingPolicy, XmAPPLICATION_DEFINED,
  767.             XmNscrollBarDisplayPolicy, XmSTATIC,
  768.             XmNshadowThickness, 0,
  769.             XmNleftAttachment, XmATTACH_FORM,
  770.             XmNbottomAttachment, XmATTACH_FORM,
  771.             XmNtopAttachment, XmATTACH_WIDGET,
  772.             XmNtopWidget, label,
  773.             NULL );
  774.  
  775.     UxPutContext( GroupExistKeywordWindow, (char *) UxCreateGroupContext );
  776.  
  777.     GroupExistKeywordList = XtVaCreateManagedWidget( "GroupExistKeywordList",
  778.             xmListWidgetClass, GroupExistKeywordWindow,
  779.             XmNhighlightThickness, 2,
  780.             XmNhighlightOnEnter, TRUE,
  781.             XmNscrollBarDisplayPolicy, XmAS_NEEDED,
  782.             XmNlistSizePolicy, XmCONSTANT,
  783.             XmNvisibleItemCount, 10,
  784.             XmNselectionPolicy, XmBROWSE_SELECT,
  785.             XmNlistMarginWidth, 0,
  786.             XmNlistMarginHeight, 2,
  787.             XmNitemCount, ExistKeywordCount,
  788.             RES_CONVERT( XmNitems, ExistKeywordString),
  789.             XmNwidth, 230,
  790.             NULL );
  791.  
  792.     UxPutContext( GroupExistKeywordList, (char *) UxCreateGroupContext );
  793.  
  794.    n = 0;
  795.    XtSetArg(wargs[n], XmNtopAttachment, XmATTACH_FORM); n++;
  796.    XtSetArg(wargs[n], XmNbottomAttachment, XmATTACH_FORM); n++;
  797.    XtSetArg(wargs[n], XmNrightAttachment, XmATTACH_FORM); n++;
  798.    XtSetArg(wargs[n], XmNleftAttachment, XmATTACH_WIDGET); n++;
  799.    XtSetArg(wargs[n], XmNleftWidget, form); n++;
  800.     form3 = XtCreateManagedWidget( "CreateGroupform",
  801.             xmFormWidgetClass, form2,
  802.             wargs, n );
  803.  
  804.     label = XtVaCreateManagedWidget( "GroupNewKeywordLabel",
  805.             xmLabelWidgetClass, form3,
  806.             XmNrecomputeSize, FALSE,
  807.             XmNmarginWidth, 2,
  808.             XmNmarginTop, 0,
  809.             XmNmarginRight, 0,
  810.             XmNmarginLeft, 0,
  811.             XmNmarginHeight, 2,
  812.             XmNmarginBottom, 0,
  813.             XmNalignment, XmALIGNMENT_BEGINNING,
  814.             XmNborderWidth, 0,
  815.             XmNleftAttachment, XmATTACH_FORM,
  816.             XmNtopAttachment, XmATTACH_FORM,
  817.             NULL );
  818.  
  819.     GroupNewKeywordText = XtVaCreateManagedWidget( "GroupNewKeywordText",
  820.             xmTextFieldWidgetClass, form3,
  821.             XmNresizeWidth, FALSE,
  822.             XmNcolumns, 36,
  823.             XmNmarginWidth, 5,
  824.             XmNmarginHeight, 5,
  825.             XmNhighlightOnEnter, TRUE,
  826.             XmNleftAttachment, XmATTACH_FORM,
  827.             XmNrightAttachment, XmATTACH_FORM,
  828.             XmNtopAttachment, XmATTACH_WIDGET,
  829.             XmNtopWidget, label,
  830.             NULL );
  831.  
  832.     UxPutContext( GroupNewKeywordText, (char *) UxCreateGroupContext );
  833.  
  834.     label = XtVaCreateManagedWidget( "GroupKeywordLabel",
  835.             xmLabelWidgetClass, form3,
  836.             XmNrecomputeSize, FALSE,
  837.             XmNmarginWidth, 2,
  838.             XmNmarginTop, 0,
  839.             XmNmarginRight, 0,
  840.             XmNmarginLeft, 0,
  841.             XmNmarginHeight, 2,
  842.             XmNmarginBottom, 0,
  843.             XmNalignment, XmALIGNMENT_BEGINNING,
  844.             XmNborderWidth, 0,
  845.             XmNleftAttachment, XmATTACH_FORM,
  846.             XmNtopAttachment, XmATTACH_WIDGET,
  847.             XmNtopWidget, GroupNewKeywordText,
  848.             NULL );
  849.  
  850.     GroupDeleteButton = XtVaCreateManagedWidget( "GroupDeleteButton",
  851.             xmPushButtonWidgetClass, form3,
  852.             XmNrecomputeSize, FALSE,
  853.             XmNmarginWidth, 2,
  854.             XmNmarginTop, 0,
  855.             XmNmarginRight, 0,
  856.             XmNmarginLeft, 0,
  857.             XmNmarginHeight, 2,
  858.             XmNmarginBottom, 0,
  859.             XmNalignment, XmALIGNMENT_CENTER,
  860.             XmNhighlightOnEnter, TRUE,
  861.             XmNrightAttachment, XmATTACH_FORM,
  862.             XmNbottomAttachment, XmATTACH_FORM,
  863.             NULL );
  864.  
  865.     UxPutContext( GroupDeleteButton, (char *) UxCreateGroupContext );
  866.  
  867.     GroupKeywordWindow = XtVaCreateManagedWidget( "GroupKeywordWindow",
  868.             xmScrolledWindowWidgetClass, form3,
  869.             RES_CONVERT( XmNbackground, "#7777BB" ),
  870.             XmNvisualPolicy, XmVARIABLE,
  871.             XmNscrollingPolicy, XmAPPLICATION_DEFINED,
  872.             XmNscrollBarDisplayPolicy, XmSTATIC,
  873.             XmNshadowThickness, 0,
  874.             XmNleftAttachment, XmATTACH_FORM,
  875.             XmNrightAttachment, XmATTACH_FORM,
  876.             XmNtopAttachment, XmATTACH_WIDGET,
  877.             XmNtopWidget, label,
  878.             XmNbottomAttachment, XmATTACH_WIDGET,
  879.             XmNbottomWidget, GroupDeleteButton,
  880.             NULL );
  881.  
  882.     UxPutContext( GroupKeywordWindow, (char *) UxCreateGroupContext );
  883.  
  884.     GroupKeywordList = XtVaCreateManagedWidget( "GroupKeywordList",
  885.             xmListWidgetClass, GroupKeywordWindow,
  886.             XmNhighlightOnEnter, TRUE,
  887.             XmNhighlightThickness, 2,
  888.             RES_CONVERT( XmNhighlightColor, "black" ),
  889.             XmNscrollBarDisplayPolicy, XmAS_NEEDED,
  890.             XmNlistSizePolicy, XmCONSTANT,
  891.             XmNvisibleItemCount, 7,
  892.             XmNselectionPolicy, XmEXTENDED_SELECT,
  893.             XmNlistMarginWidth, 0,
  894.             XmNlistMarginHeight, 2,
  895.             NULL );
  896.  
  897.     UxPutContext( GroupKeywordList, (char *) UxCreateGroupContext );
  898.  
  899.     XtAddCallback( CGform, XmNdestroyCallback,
  900.             UxFreeClientDataCB,
  901.             (XtPointer) UxCreateGroupContext );
  902.  
  903.     XtAddCallback( GroupDoneButton, XmNactivateCallback,
  904.             activateCB_GroupDoneButton,
  905.             (XtPointer) UxCreateGroupContext );
  906.  
  907.     XtAddCallback( GroupCancelButton, XmNactivateCallback,
  908.             activateCB_GroupCancelButton,
  909.             (XtPointer) UxCreateGroupContext );
  910.  
  911.     XtAddCallback( GroupNextButton, XmNactivateCallback,
  912.             activateCB_GroupNextButton,
  913.             (XtPointer) UxCreateGroupContext );
  914.  
  915.     XtAddCallback( GroupExistKeywordList, XmNbrowseSelectionCallback,
  916.             browseSelectionCB_GroupExistKeywordList,
  917.             (XtPointer) UxCreateGroupContext );
  918.  
  919.     XtAddCallback( GroupNewKeywordText, XmNactivateCallback,
  920.             activateCB_GroupNewKeywordText,
  921.             (XtPointer) UxCreateGroupContext );
  922.  
  923.     XtAddCallback( GroupDeleteButton, XmNactivateCallback,
  924.             activateCB_GroupDeleteButton,
  925.             (XtPointer) UxCreateGroupContext );
  926.  
  927. /* MB 5/4/93  temporarily taking the color picker out of demobook
  928.     XtAddCallback( ColorButton, XmNactivateCallback,
  929.             activateCB_ColorButton,
  930.             (XtPointer) UxCreateGroupContext );
  931. */
  932.  
  933. /*
  934.     XtAddCallback( GroupGL, GlxNinputCallback, 
  935.             inputCB_GroupGL,
  936.             NULL);
  937.  
  938. */
  939.     return ( CreateGroup_shell );
  940. }
  941. /*******************************************************************************
  942.     The following function includes the code that was entered
  943.     in the 'Initial Code' and 'Final Code' sections of the
  944.     Declarations Editor. This function is called from the
  945.     'Interface function' below.
  946. *******************************************************************************/
  947.  
  948. static Widget    _Ux_create_CreateGroup()
  949. {
  950.     Widget                 rtrn;
  951.     _UxCCreateGroup         *UxContext;
  952.  
  953.     UxCreateGroupContext = UxContext =
  954.         (_UxCCreateGroup *) XtMalloc( sizeof(_UxCCreateGroup) );
  955.  
  956.         rtrn = _Uxbuild_CreateGroup();
  957.  
  958.     XtRealizeWidget ( CreateGroup_shell );
  959.  
  960.     SetWMhints ( CreateGroup_shell );
  961.  
  962.     return(rtrn);
  963. }
  964.  
  965. /*******************************************************************************
  966.     The following is the 'Interface function' which is the
  967.     external entry point for creating this interface.
  968.     This function should be called from your application or from
  969.     a callback function.
  970. *******************************************************************************/
  971.  
  972. Widget    create_CreateGroup()
  973. {
  974.     Widget            _Uxrtrn;
  975.  
  976.     _Uxrtrn = _Ux_create_CreateGroup();
  977.  
  978.     return ( _Uxrtrn );
  979. }
  980.  
  981. popup_CreateGroup()
  982. {
  983.     struct grptmpltstruct *grpptr;
  984.     char title_string[20];
  985.  
  986.     if (EditGroupFlag == 1)
  987.       strcpy (title_string, "EditingBook");
  988.     else
  989.       strcpy (title_string, "NewBook");
  990.     XtVaSetValues( CreateGroup_shell,
  991.             XmNtitle, title_string,
  992.             NULL );
  993.  
  994.     XtVaSetValues( GroupExistKeywordList,
  995.             XmNitemCount, ExistKeywordCount,
  996.             RES_CONVERT( XmNitems, ExistKeywordString ),
  997.             NULL );
  998.  
  999.     if (EditGroupFlag == 1) {
  1000.       grpptr = curgroup;
  1001.       XtVaSetValues( GroupNameText, XmNvalue, grpptr->nameptr->string, NULL );
  1002.       XtVaSetValues( GroupNameText, XmNcursorPosition, strlen(grpptr->nameptr->string), NULL );
  1003.           if (grpptr->helpfile != NULL)
  1004.              {
  1005.       XtVaSetValues( GroupHelpFileText, XmNvalue, grpptr->helpfile->name, NULL );
  1006.       XtVaSetValues( GroupHelpFileText, XmNcursorPosition, strlen(grpptr->helpfile->name), NULL );
  1007.  
  1008.              }
  1009.       if (GroupKeywordCount > 0)
  1010.         XtVaSetValues( GroupKeywordList,
  1011.             XmNitemCount, GroupKeywordCount,
  1012.             RES_CONVERT( XmNitems, GroupKeywordString ),
  1013.             NULL );
  1014.  
  1015.       XtUnmapWidget(GroupNextButton);
  1016.     }
  1017.     else
  1018.       XtMapWidget(GroupNextButton);
  1019.  
  1020.     UxPopupInterface(CreateGroup, no_grab);
  1021.  
  1022. }
  1023.  
  1024. GetGroupKeywords()
  1025. {
  1026. int keyword_count;
  1027. XmString *keyword_table;
  1028. char *keyword_string;
  1029. Arg args[5];
  1030. int i, n;
  1031. struct charlist *newcharptr;
  1032.  
  1033.     if (KW_change) {
  1034.       n = 0;
  1035.       XtSetArg(args[n], XmNitemCount, &keyword_count); n++;
  1036.       XtSetArg(args[n], XmNitems, &keyword_table); n++;
  1037.       XtGetValues(GroupKeywordList, args, n);
  1038. /*      printf("Num Group Keywords = %d\n", keyword_count); */
  1039.       HeadGrpChar = NULL;
  1040.       TailGrpChar = NULL;
  1041.       if (keyword_count > 0) {
  1042.         for (i=0; i<keyword_count; i++) {
  1043.           keyword_string = extract_first_xms_segment(keyword_table[i]);
  1044.           newcharptr = (struct charlist *)malloc(sizeof(struct charlist) );
  1045.               newcharptr->next = NULL;
  1046.           if (HeadGrpChar == NULL)
  1047.             HeadGrpChar = newcharptr;
  1048.           else
  1049.             TailGrpChar->next = newcharptr;
  1050.           TailGrpChar = newcharptr;
  1051.           if (find_keyword(keyword_string) != NULL) {
  1052.             TailGrpChar->indexflag = 1;
  1053.         TailGrpChar->str = keyword_string;
  1054.           }
  1055.           else {
  1056.             TailGrpChar->indexflag = 0;
  1057.             TailGrpChar->str = (char *)malloc(strlen(keyword_string)+1);
  1058.             strcpy(TailGrpChar->str, keyword_string);
  1059.           }
  1060. /*          printf("%s\n", TailGrpChar->str); */
  1061.         }
  1062.       }
  1063.     }
  1064. }
  1065.  
  1066. /*******************************************************************************
  1067.     END OF FILE
  1068. *******************************************************************************/
  1069.  
  1070.